package com.aisino.efence.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author fzc
 * @package com.aisino.efence.web
 * 测试controller
 * @create 2018-04-11 下午1:21
 **/
@RestController
public class TestContoller {

    private static final Logger LOG = LoggerFactory.getLogger(TestContoller.class);



    @RequestMapping("/secret/v1/keyId")
    public Map<String, Object> getId() {
        Map<String, Object> result = new HashMap<>();
        Map<String, Object> data = new HashMap<>();
        data.put("keyId", "key");
        result.put("code", 200);
        result.put("data", data);
        return result;
    }
    @RequestMapping("/scret/v1/sskey/{id}")
    public Map<String, Object> getToken(@PathVariable(value = "id") String id) {
        Map<String, Object> result = new HashMap<>();
        Map<String, Object> data = new HashMap<>();
        data.put("sskey", "mzttkYIjbvDJDzFU");
        data.put("name", "name");
        data.put("token", "token");
        result.put("code", 200);
        result.put("data", data);
        return result;
    }

    @RequestMapping("/invoice/data/download/notify")
    public Map<String, Object> getMessage(String fileName) {
        LOG.info("[Method]-[getMessage]-通知文件：[{}]",fileName);
        Map<String, Object> result = new HashMap<>();
        result.put("code", 200);
        result.put("message", "提交成功");
        return result;
    }
}
